package com.vains.system.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 统一响应类
 *
 * @author vains
 * @version 1.0
 * @since 2020/6/3 16:57
 * @param <T>响应数据 类型</T>
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value="Result,响应对象", description="统一响应对象")
public class Result<T> {

    /**
     * 响应状态码
     */
    @ApiModelProperty(value = "响应状态码")
    private Integer code;

    /**
     * 是否操作成功
     */
    @ApiModelProperty(value = "是否操作成功")
    private Boolean success;

    /**
     * 响应信息
     */
    @ApiModelProperty(value = "响应信息")
    private String message;

    /**
     * 响应数据
     */
    @ApiModelProperty(value = "响应数据")
    private T data;

}
